﻿using System.Collections.Generic;
using RestSharp;

namespace FellowshipOne.API.Base.Interfaces
{
    public interface IApiSet<T> where T : new()
    {
        bool Create(byte[] stream, string url = "");
        T Create(T entity, string url = "");
        T Create(T entity, out string requestXml, string url = "");
        bool Delete(string id);
        T Get(string id);
        T Get(string parentID, string id);
        byte[] GetByteArray(IRestRequest request);
        T GetByUrl(string url);
        List<T> List();
        List<T> List(string parentID);
        S Search<S>(Restify.QueryObject qo) where S : new();
        bool Update(byte[] stream, string id);
        T Update(T entity, string id);
        T Update(T entity, string id, out string requestXml);
    }
}
